# -*- coding: utf-8 -*-
from flask import request, jsonify, render_template
from app.api import nds_api


@nds_api.app_errorhandler(404)
def page_not_found(e):
    return render_template('404.html'), 404


@nds_api.app_errorhandler(500)
def internal_server_error(e):
    return render_template('500.html'), 500


@nds_api.route("/web", methods=["GET", "POST"])
def web_test():
    print('----web_test----')
    return jsonify(request.url, request.remote_addr, request.base_url, request.path, request.trusted_hosts,
                   request.access_route, request.host, request.host_url, request.full_path)
